import Child from "../components/children";
import {useState} from "react";
function index(){
    const state ={
        name:'tom',
        age:90
    }
    const [parentValue,setParentValue] = useState(0)
    function getChild(val){
        setParentValue(val)
    }
    return (
        <>
        <div>父组件</div>
            <div>父组件的值：{parentValue}</div>
            <Child info={state} getChild={getChild}/>
        </>
    )
}
export default index
